package com.game.league.articles.exchange;

import com.game.league.articles.table.Articles;
import com.game.league.entrance.user.table.User;

import cn.bmob.v3.BmobObject;

/**
 * 映射类 - 物品兑换表
 * Created by Su on 2019/6/3.
 */
public class Exchange extends BmobObject {
    private User user;          // 兑换的用户
    private Articles articles; //兑换的物品

    private Integer num;        // 兑换数量
    private Integer status;     // 兑换状态  1=处理中  2=已发放； 3= 已失效

    public String getStatusText() {
        String title = "";
        if (getStatus() == 1) {
            title = "【处理中】";
        } else if (getStatus() == 2) {
            title = "【已发放】";
        } else if (getStatus() == 3) {
            title = "【已失效】";
        }
        return title;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Articles getArticles() {
        return articles;
    }

    public void setArticles(Articles articles) {
        this.articles = articles;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
}
